<template>
    <el-menu :default-openeds="['1', '3']" style="min-height: 100%; overflow-x: hidden"
             background-color="rgb(48, 65, 86)"
             text-color="#fff"
             active-text-color="#ffd04b"
             :collapse-transition="false"
             :collapse="isCollapse"
             router
    >
        <div style="height: 60px; line-height: 60px; text-align: center">
            <img src="../assets/logo.png" alt="" style="width: 20px; position: relative; top: 5px; right: 5px">
            <b style="color: white" v-show="logoTextShow">安维后台管理系统</b>
        </div>

       <!-- <div v-for="item in roleRoutes" :key="item.routeId">
            <div v-if="item.routeUrl">
                <el-menu-item :index="item.routeUrl">
                    <i :class="item.routeIcon"></i>
                    <span slot="title">{{item.routeName}}</span>
                </el-menu-item>
            </div>
            <div v-else>
                <el-submenu :index="item.routeId + ''">
                    <template slot="title">
                        <i :class="item.routeIcon"></i>
                        <span slot="title">{{ item.routeName }}</span>
                    </template>
                    <div  v-for="subItem in item.children" :key="subItem.routeId">
                        <el-menu-item :index="subItem.routeUrl">
                            <i :class="subItem.routeIcon"></i>
                            <span slot="title">{{ subItem.routeName }}</span>
                        </el-menu-item>
                    </div>
                </el-submenu>
            </div>
        </div>-->

        <el-menu-item index="/home">
            <template slot="title">
                <i class="el-icon-house"></i>
                <span slot="title">主页</span>
            </template>
        </el-menu-item>


      <el-submenu index="9">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span slot="title">公告管理</span>
        </template>


      </el-submenu>

      <el-submenu index="4">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span slot="title">组织管理</span>
        </template>

        <el-menu-item index="/ManuFacturer">厂商管理</el-menu-item>
        <el-menu-item index="/UserList">工程师管理</el-menu-item>
        <el-menu-item index="/ServiceProvider">服务商管理</el-menu-item>


      </el-submenu>

      <el-submenu index="5">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span slot="title">订单管理</span>
        </template>

        <el-menu-item index="/test">测试测试</el-menu-item>

      </el-submenu>

      <el-submenu index="6">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span slot="title">工单管理</span>
        </template>

        <el-menu-item index="/test">测试测试</el-menu-item>

      </el-submenu>

      <el-submenu index="7">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span slot="title">结算管理</span>
        </template>
        <el-menu-item index="/FacturerPayMent">厂商支付单</el-menu-item>
        <el-menu-item index="/ServicePayMent">服务商支付单</el-menu-item>
      </el-submenu>

      <el-submenu index="8">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span slot="title">报表管理</span>
        </template>

        <el-menu-item index="/test">测试测试</el-menu-item>

      </el-submenu>
    </el-menu>
</template>

<script>
     export default {
        name: "Aside",
        props: {
            isCollapse: Boolean,
            logoTextShow: Boolean
        },
        data() {
            return {
                roleRoutes:[],
            }
        },

        created(){
            // this.roleRoutes = JSON.parse(localStorage.getItem('roleRoutes'));
            // console.log(this.roleRoutes)
        },
        methods: {

        }
    }
</script>

<style scoped>

</style>
